package com.wanjia.estate.utils;

import lombok.extern.slf4j.Slf4j;

import java.io.File;

@Slf4j
public class FolderUtil {
    public static void deleteFolder(File folder) {
        File[] files = folder.listFiles();
        if (files != null) {
            for (File file : files) {
                if (file.isDirectory()) {
                    deleteFolder(file);
                } else {
                    file.delete();
                }
            }
        }
        folder.delete();
        log.info("文件夹删除中。。。。");
    }

}
